#include <string>
#include "Poco/TextEncoding.h"
#include "Poco/TextConverter.h"
#include "Poco/UTF8Encoding.h"
#include "Poco/ASCIIEncoding.h"
#include "utf8.h"

using namespace std;

// The Encoder class implements a UTF-8 to Ascii and Ascii to UTF-8 encoding converters.
class Encoder {
private:
	Poco::TextEncoding& encoding;

public:
	// Class constructor. Receives the encoding of the string we want to work on.
	Encoder(Poco::TextEncoding& enc);
	virtual ~Encoder() { }

	// Converts the given string from UTF-8 encoding to Ascii
	void utf8ToAscii (string& toEncode);

	// Converts the given string from Ascii encoding to UTF-8
	void asciiToUtf8 (string& toEncode);
};
